<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
      'use strict'
      //学生的成绩，学生的姓名
      // var names =['zhangsan','lisi','wangwu']
      // var scores =[100,90,80]
      //Map
      //二维数组
      var map = new Map([["tom",100],["jack",90],['zhangsan',80]]);
      var name = map.get('tom');
      map.set("admin",12345)
      console.log(name);
      map.delete("tom");
        //Set：无序不重复的集合
      var  set = new Set([3,1,1,2,2,3,1,2])
      //console.log    Set(3)  {3,1,2}
      set.add(1)  //添加
      set.delete(1) //删除
      //判断是否包含元素
      console.log(set.has(3));


      //in 数组前置值   of 数组值
      var arr= [3,4,5]
      for (var x in arr){
        console.log(x)
      }

      //遍历map
      var map = new Map([["zhansgan",100],["lisi",90],['wangwu',80]]);
      for (let x of map){
        console.log(x)
      }
      //遍历set
      var set = new Set([5,6,7])
      for (let x of set){
        console.log(x)
      }

    </script>
</head>
<body>

</body>
</html>